package com.gupaoedu.demo.action;

import com.gupaoedu.demo.service.ITestService;
import com.gupaoedu.spring.framework.annotation.GPAutowired;
import com.gupaoedu.spring.framework.annotation.GPController;
import com.gupaoedu.spring.framework.annotation.GPRequestMapping;
import com.gupaoedu.spring.framework.annotation.GPRequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description TODO
 * @Time 2020-12-14 22:43
 * @Email 44867924@qq.com
 * @author fan
 * @version 1.0v
 */
@GPController
@GPRequestMapping("/demo/")
public class DemoAction {

    @GPAutowired
    private ITestService testService;
    private ITestService testService2;

    @GPRequestMapping("/query/")
    public void query(HttpServletRequest req, HttpServletResponse resp,
                      @GPRequestParam("name")String name, @GPRequestParam("id")String id){
        System.out.println("name : "+name);
        System.out.println("id : "+id);

    }

    @GPRequestMapping("/add/")
    public void add(HttpServletRequest req, HttpServletResponse resp,
                      @GPRequestParam("a")Integer a,@GPRequestParam("b")Integer b){
        System.out.println("a : "+a);
        System.out.println("b : "+b);

    }

    @GPRequestMapping("/remove/")
    public void remove(HttpServletRequest req, HttpServletResponse resp,
                      @GPRequestParam("id")Integer id){
        System.out.println("id : "+id);

    }

}
